package com.resou.reader.reading;

import com.resou.reader.api.entry.BookDetailBean;
import com.resou.reader.api.entry.ChapterItemBean;
import com.resou.reader.api.service.BookService;
import com.resou.reader.data.Injection;
import com.resou.reader.bookshelf.readhistory.datasupport.ReaderHistory;

import java.util.List;

import io.reactivex.Observable;

public class ReadingRepository {
    private static ReadingRepository sInstance;
    private final BookService mBookService;

    public ReadingRepository() {
        mBookService = Injection.provideBookService();
    }

    public static ReadingRepository getInstance() {
        if (sInstance == null) {
            sInstance = new ReadingRepository();
        }
        return sInstance;
    }


    public BookDetailBean loadBookDetailBean(String bookId) {
        return null;
    }

    public Observable<List<ChapterItemBean>> getChapterList(String bookId, String token, String device) {
        return null;
    }

    /**
     * 获取书本的目录列表
     *
     * @param bookId
     * @param token
     * @param device
     * @return
     */
    private Observable<List<ChapterItemBean>> getBookCatalogList(String bookId, String token, String device) {
        return null;
    }

    /**
     * 检测是否已添加到书架
     *
     * @return
     */
    public boolean checkIsInShelf(String bookId) {
        return false;
    }

    public List<ReaderHistory> getReadHistory(String bookId) {
        return null;
    }
}